<template>
  <div class="aa-div" :style="{color: colorStr}" @click="dianji">
     <img :src='cc' alt="" >
      <p @click="xieru">{{dd(dd)}}</p>
  </div>
</template>

<script>
export default {
  props: ['cc', 'dd'],
  data() {
    return {
      colorStr:"",
      xieru:[]
    };
  },
  methods:{
    dianji(){
      // 这玩应点一下变个色
      this.colorStr = `rgb(${Math.floor(Math.random() * 256)}, ${Math.floor(
        Math.random() * 256
      )}, ${Math.floor(Math.random() * 256)})`
    },
    
  }
};
</script>

<style>
.aa-div {
  /* width: 200px; */
  border: 1px solid black;
  text-align: center;
  float: left;
}
.aa-div img {
  width: 300px;
  /* height: 300px; */
}
</style>
